#include "signals.h"
#include <QDebug>

Signals::Signals(int value) : m_value(value)
    {
    }

    void Signals::setValue(int value)
    {
        if (m_value != value)
        {
            int oldvalue=m_value;
            m_value=value;
            emit valueChanged (oldvalue, m_value);
        }
    }

    void Signals::onValueChanged (int oldValue, int newValue)
    {
        qDebug() << "Value changed from" << oldValue << "to" <<newValue;
    }

